<li class="nav-item px-2 {% if Model.HasItems %}dropdown{% endif %}">
    {% shape_clear_alternates Model %}
    {% shape_type Model "MenuItemLink" %}
    {% if Model.HasItems %}
    <a class="js-scroll-trigger nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        {{ Model.ContentItem.Content.LinkMenuItemPart.Name }}
    </a>
    <ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
        {% for item in Model.Items %}
        {{ item | shape_render }}
        {% endfor %}
    </ul>
    {% else %}
        {{ Model | shape_render }}
    {% endif %}
</li>